package com.project.myPackage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.project.myPackage.entity.Orders;
import com.project.myPackage.mapper.OrdersMapper;
import com.project.myPackage.service.OrdersService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> implements OrdersService {
    @Autowired
    private OrdersMapper ordersMapper;

   public List<Map<String, Object>> getAllOrdersByUserId(Integer user_id,Integer status){
        return ordersMapper.getAllOrdersByUserId(user_id,status);
    }

   public List<Map<String, Object>> getAllOrdersByStatus(Integer status){
        return ordersMapper.getAllOrdersByStatus(status);
    }
}
